package com.gxy.learn.backup.shiroauth.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxy.learn.backup.shiroauth.entity.SysMenu;
import com.gxy.learn.backup.shiroauth.mapper.SysMenuMapper;
import com.gxy.learn.backup.shiroauth.service.SysMenuService;
import com.gxy.learn.backup.shiroauth.vo.UserMenuVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author: Gao xueyong
 * Create at: 2022/1/4 下午11:53
 */
@Slf4j
@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService {


    @Override
    public List<UserMenuVO> getSysMenuByAccount(String account) {
        if(StringUtils.isBlank(account)){
            return null;
        }
        return baseMapper.getSysMenuByAccount(account);
    }

    @Override
    public SysMenu getSysMenuByHref(String href) {
        if(StringUtils.isBlank(href)){
            return null;
        }
        return baseMapper.getSysMenuByHref(href);
    }




}
